Conversation
RonnyPfannschmidt
left a comment
There was a problem hiding this comment.
thank you for trying to start this - but i think its critical to fix the right project - the pgyments linter needs a fix, the output examples need to stay exactly how they where
|
|
||
| $ pytest -q test_subtest.py | ||
| uuuuuF [100%] | ||
| u u u u uF [100%] |
There was a problem hiding this comment.
the next doc regen would undo this change
additionally the code block should lint as "pytest" theres a extra linter in pygments for that
the pygments linter may need updates
There was a problem hiding this comment.
Thank you for the clarification. That makes sense.
I’ll revert the documentation changes and move the fix to the correct location. I’ll investigate the Pygments pytest lexer and open an issue/PR there so that the highlighting is corrected at the source. Once Pygments updates the lexer, pytest’s documentation can regenerate with the correct output.
Thanks for the guidance, I’ll follow up with the Pygments-side fix.
Hello,
This PR resolves #13902.
Description
This PR corrects the subtests documentation example, which currently uses
.. code-block:: pytestand displays allucharacters in green. This is misleading because the real test output includes both passing and failing subtests, and pytest's syntax highlighter cannot distinguish between them. As a result, the documentation incorrectly implies that all subtests passed.Solution
Replaces
.. code-block:: pytestwith.. code-block:: consoleto disable pytest-specific highlighting. This updates the subtest output example to show a realistic mixture of subtest results (e.g.,u u u u uF) without relying on color and ensures the documentation reflects actual pytest output, including multiple subtest results and the final test failure due to failed subtests.Information
Head-fork: emilymamcarz/pytest
compare: issue13902
base-fork: pytest-dev/pytest
base: main
Thanks,
Emily